import PropTypes from 'prop-types';
import React from 'react';
import {Post} from './Post';

export function Posts(props) {
  const user = props.user;
  return (
      <div className="posts">{props.posts.map(post => <Post key={post.id} id={post.id} post={post} user={user} />)}</div>
  );
}
Posts.propTypes = {
  posts: PropTypes.array
};
export default Posts;
